package com.kexio.enterprise.integration.message.template;

import com.kexio.enterprise.integration.message.enums.MessageType;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 消息模板
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class MessageTemplate {
    private String templateId;
    private String templateName;
    private MessageType type;
    private String subject;
    private String content;
    private String contentType;
    private Map<String, Object> defaultVariables;
    private Map<String, String> templateVariables; // 变量说明
    private boolean enabled;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String version;

    public MessageTemplate() {
        this.templateId = java.util.UUID.randomUUID().toString();
        this.enabled = true;
        this.createTime = LocalDateTime.now();
        this.version = "1.0";
        this.contentType = "text/plain";
    }

    // Getters and Setters
    public String getTemplateId() { return templateId; }
    public void setTemplateId(String templateId) { this.templateId = templateId; }
    
    public String getTemplateName() { return templateName; }
    public void setTemplateName(String templateName) { this.templateName = templateName; }
    
    public MessageType getType() { return type; }
    public void setType(MessageType type) { this.type = type; }
    
    public String getSubject() { return subject; }
    public void setSubject(String subject) { this.subject = subject; }
    
    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }
    
    public String getContentType() { return contentType; }
    public void setContentType(String contentType) { this.contentType = contentType; }
    
    public Map<String, Object> getDefaultVariables() { return defaultVariables; }
    public void setDefaultVariables(Map<String, Object> defaultVariables) { this.defaultVariables = defaultVariables; }
    
    public Map<String, String> getTemplateVariables() { return templateVariables; }
    public void setTemplateVariables(Map<String, String> templateVariables) { this.templateVariables = templateVariables; }
    
    public boolean isEnabled() { return enabled; }
    public void setEnabled(boolean enabled) { this.enabled = enabled; }
    
    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }
    
    public LocalDateTime getUpdateTime() { return updateTime; }
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }
    
    public String getVersion() { return version; }
    public void setVersion(String version) { this.version = version; }
}
